// pages/userStatistics/Personnel/QXManage.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    QXList:[
      {
        name:"用户权限",
        tips:"(包含普通用户、普通会员、VIP会员、股东)",
        selected:false,
        power:"USER"
      },
      {
        name:"订单权限",
        tips:"(包含线上、线下开单、预约管理)",
        selected:false,
        power:"ORDER"
      },
      {
        name:"核销权限",
        tips:"(包含优惠券核销、商品核销、套餐卡核销)",
        selected:false,
        power:"WRITE_OFF"
      },
      {
        name:"轮播图权限",
        tips:"",
        selected:false,
        power:"ROTATION"
      },
      {
        name:"商品权限",
        tips:"(包含普通商圈、云商品)",
        selected:false,
        power:"GOODS"
      },
      {
        name:"员工权限",
        tips:"(注意:拥有该权限店员可以操作权限管理)",
        selected:false,
        power:"STAFF"
      },
      {
        name:"拼团权限",
        tips:"",
        selected:false,
        power:"PIN"
      },
      {
        name:"优惠券权限",
        tips:"",
        selected:false,
        power:"COUPON"
      },
      {
        name:"会员卡权限",
        tips:"(包含套餐卡、充值卡、引流卡、线下开卡)",
        selected:false,
        power:"VIP"
      },
      {
        name:"红包权限",
        tips:"",
        selected:false,
        power:"RED"
      },
      {
        name:"商圈权限",
        tips:"",
        selected:false,
        power:"GROUP"
      },
      {
        name:"评论权限",
        tips:"",
        selected:false,
        power:"COMMENT"
      },
      {
        name:"查看营收",
        tips:"",
        selected:false,
        power:"REVENUE"
      },
      {
        name:"记账",
        tips:"",
        selected:false,
        power:"BOOK"
      }
    ]
  },

  //跳转员工权限
  toQXStaffList(e){
    let index=e.currentTarget.dataset.index
    wx.navigateTo({
      url: '/pages/userStatistics/Personnel/QXStaffList?power='+this.data.QXList[index].power,
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  // onShareAppMessage: function () {

  // }
})